﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace MoneyManagerNET.Presentation.View
{
    using Presentation.ViewModel;
    /// <summary>
    /// Interaction logic for AccountView.xaml
    /// </summary>
    public partial class BankAccountView : UserControl, IView<BankAccountViewModel>
    {
        public BankAccountView()
        {
            InitializeComponent();
        }

        private void MenuItem_Click(object sender, RoutedEventArgs e)
        {
            var m = e.Source as MenuItem;
            this.ViewModel().Filter = m.DataContext as MoneyManagerNET.Presentation.ViewModel.BankAccountViewModel.TransactionFilter;
        }

        private void ContextMenu_MouseDown(object sender, MouseButtonEventArgs e)
        {
            
        }

        private void Grid_MouseDown(object sender, MouseButtonEventArgs e)
        {
            var menu = Resources["filterMenu"] as ContextMenu;
            menu.PlacementTarget = sender as UIElement;
            menu.IsOpen = true;
        }

       
    }
}
